package com.eam.service.impl;

import java.util.List;

import com.eam.bean.Department;
import com.eam.dao.DepartmentDAO;
import com.eam.service.DepartmentService;

public class DepartmentServiceImpl extends DepartmentService {
	
	private DepartmentDAO departmentDao;
	
	public DepartmentDAO getDepartmentDao() {
		return departmentDao;
	}

	public void setDepartmentDao(DepartmentDAO departmentDao) {
		this.departmentDao = departmentDao;
	}

	@Override
	public boolean save(Department department) {
		return departmentDao.save(department);
	}

	@Override
	public boolean delete(Department department) {
		return departmentDao.delete(department);
	}

	@Override
	public Department updatePre(Department department) {
		System.out.println("service:id:" + department.getDepartmentId());
		return departmentDao.updatePre(department);
	}

	@Override
	public boolean update(Department department) {
		return departmentDao.update(department);
	}

	@Override
	public List<Department> query() {
		return departmentDao.findAll();
	}

}
